package com.mxdx.edu.service.impl;

import com.mxdx.edu.dao.CmsCategoryDao;
import com.mxdx.edu.service.ICmsCategoryService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * cmsservice
 *
 * @author howie
 */
@Service
public class CmsCategoryServiceImpl implements ICmsCategoryService {

	@Resource
	private CmsCategoryDao cmsCategoryDao;

	@Override
	public List<Map<String, Object>> findListByMap(Map<String, Object> param) {
		return cmsCategoryDao.findListByMap(param);
	}

	@Override
	public Map<String, Object> findMapByMap(Map<String, Object> param) {
		List<Map<String, Object>> list = cmsCategoryDao.findListByMap(param);
		if(list != null && list.size() > 0){
			return list.get(0);
		}
		return new HashMap<>();
	}
}
